package org.jeecg.modules.demo.customer.service.impl;

import org.jeecg.modules.demo.customer.entity.YxCustomer;
import org.jeecg.modules.demo.customer.mapper.YxCustomerMapper;
import org.jeecg.modules.demo.customer.service.IYxCustomerService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: yx_customer
 * @Author: jeecg-boot
 * @Date:   2021-12-08
 * @Version: V1.0
 */
@Service
public class YxCustomerServiceImpl extends ServiceImpl<YxCustomerMapper, YxCustomer> implements IYxCustomerService {
    @Resource
    private YxCustomerMapper yxCustomerMapper;

    @Override
    public List<YxCustomer> getCustomerList(){
        return yxCustomerMapper.getCustomerList();
    }
    @Override
    public boolean revertLogicDeletedCustomer(List<String> customerIds){
        String ids = String.format("'%s'", String.join("','", customerIds));
        return yxCustomerMapper.revertLogicDeletedCustomer(ids) > 0;
    }

}
